﻿using System;
using System.Collections.Generic;
using System.Text;

using System.IO;
using System.Net.Sockets;

namespace Uniriotec.DC
{
    public class BufferedReader<T> : StreamReader where T : Stream
    {
        private T unbufferedStream;
        private Socket socket;

        public T UnbufferedStream
        {
            get { return unbufferedStream; }
            set { unbufferedStream = value; }
        }

        public BufferedReader(Socket socket)
            : base(new NetworkStream(socket))
        {
            this.socket = socket;
        }

        public BufferedReader(T stream)
            : base(stream)
        {
            unbufferedStream = stream;
        }

    }
}
